home *** CD-ROM | disk | FTP | other *** search
/ Strategy Challenges Collection / Strategy Challenges Collection.iso / pc / demo / demodata / menu.dxr / 00141.ls < prev    next >
Encoding:
Text File  |  1996-10-02  |  1.4 KB  |  56 lines

  1. on enterFrame
  2.   global gBeenThere, gVoiceFlag
  3.   if gBeenThere = 0 then
  4.     repeat with nn = 3 to 7
  5.       puppetSprite(nn, 1)
  6.     end repeat
  7.     if gVoiceFlag = 0 then
  8.       puppetSound("SubMain.aif")
  9.       set gVoiceFlag to 1
  10.     end if
  11.     set gBeenThere to 1
  12.   end if
  13. end
  14.  
  15. on exitFrame
  16.   global UserTimer, gAutoMode
  17.   timeOutCheck()
  18.   if gAutoMode then
  19.     goSubAuto()
  20.   else
  21.     go(the frame)
  22.     SubmenuRoll()
  23.   end if
  24. end
  25.  
  26. on SubmenuRoll
  27.   if the mouseCast > 1 then
  28.     set tempName to the name of cast the mouseCast
  29.     if tempName contains "_Roll" then
  30.       nothing()
  31.     else
  32.       repeat with nn = 2 to 24
  33.         if the castNum of sprite nn < 1 then
  34.           next repeat
  35.         end if
  36.         if the name of cast the castNum of sprite nn contains "_Roll" then
  37.           set tempOld to the name of cast the castNum of sprite nn
  38.           set tempOld to chars(tempOld, 1, length(tempOld) - 5)
  39.           set the castNum of sprite nn to the number of member tempOld
  40.           exit repeat
  41.         end if
  42.       end repeat
  43.       repeat with nn = 2 to 24
  44.         if the castNum of sprite nn < 1 then
  45.           next repeat
  46.         end if
  47.         if the name of cast the castNum of sprite nn = tempName then
  48.           set the castNum of sprite nn to the number of member (tempName & "_Roll")
  49.           exit repeat
  50.         end if
  51.       end repeat
  52.     end if
  53.   end if
  54.   updateStage()
  55. end
  56.